<!DOCTYPE html>
<html>
	{include file="head.html"}
	<body>
		<div class="header">
			<div class="header-back"></div>
			<div class="header-title">在线充值</div>
		</div>
		<div class="header-row"></div>
		<div class="main-body">
			<form action="/index.php?m=sgpay&a=save&ajax=1">
				
				<div class="input-flex flex-ai-center">
					<div class="input-flex-label">金额：</div>
					<input class="input-flex-text" type="text" name="money" />
					<div class="mgl-5">元</div>
				</div>
				<div class="pd-10 cl-red">
					网银、支付宝、微信转账成功后，在点击下方充值，系统自动入账。
				</div>
				<div class="row-box">
					<div class="flex mgb-5">
						<div class="mgr-5 fwb">开户行：</div>
						<div>{$bank.s_bank_name}</div>
						<div class="flex-1"></div>
						<div class="btn-small btn-outline-success" data-clipboard-text="{$bank.s_bank_name}" id="yhk_name"  >复制</div> 
					</div>
					<div class="flex mgb-5">
						<div class="mgr-5 fwb">姓名：</div>
						<div   >{$bank.s_bank_user}</div>
						<div class="flex-1"></div>
						<div  class="btn-small btn-outline-success"  data-clipboard-text="{$bank.s_bank_user}" id="yhk_user"  >复制</div>
					</div>
					
					
					<div class="flex mgb-5">
						<div class="mgr-5 fwb">账号：</div>
						<div>{$bank.s_bank_num}</div>
						<div class="flex-1"></div>
						<div  class="btn-small btn-outline-success"  data-clipboard-text="{$bank.s_bank_num}" id="yhk_no"  >复制</div>
					</div>
					 
				</div>
				<div id="submit" class="btn-row-submit">充值</div>
				
				
			</form>
		</div>
		{include file="footer.html"}
		<script src="/plugin/clipboardjs/clipboard.min.js"></script>
		<script>
			    $(function(){
					$(document).on("click","#submit",function(){
						$.post(
							"/index.php?m=sgpay&a=save&ajax=1",
							$("form").serialize(),
							function(res){
								if(res.error){
									skyToast(res.message)
									return false;
								}
								window.location="/index.php?m=sgpay&a=success&id="+res.data
							},"json"
						)
					})
				})
			  var copy1 = new ClipboardJS(document.getElementById("yhk_no"));
			   copy1.on("success",function(e){
				   skyToast("账号复制成功");
			   })
			   var copy2 = new ClipboardJS(document.getElementById("yhk_user"));
			    copy2.on("success",function(e){
			   		skyToast("姓名复制成功");
			    })
				copy2.on("error",function(e){
					skyToast("fail");
				})
				var copy3 = new ClipboardJS(document.getElementById("yhk_name"));
				 copy3.on("success",function(e){
					skyToast("开户行复制成功");
				 })
		</script>
	</body>
</html>
